 $(function () {
        $('#table').bootstrapTable({
            method: "get",
            striped: true,
            singleSelect: false,
            url: "",
            dataType: "json",
            pagination: true, //分页
            pageSize: 10,
            pageNumber: 1,
            search: false, //显示搜索框
            contentType: "application/x-www-form-urlencoded",
            queryParams: null,
            columns: [
                {
                    checkbox:"true",
                    field: 'ID',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: "商品编号",
                    field: 'name',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '品名',
                    field: 'gender',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '生产厂家',
                    field: 'graduate',
                    align: 'center'
                },
                {
                    title: '规格',
                    field: 'education',
                    align: 'education',
                    valign: 'middle'
                },
                {
                    title: '型号',
                    field: 'major',
                    align: 'center',
                    valign: 'middle'
                },
                {
                    title: '单位',
                    field: 'postId',
                    align: 'center'
                   
                },
                 {
                    title: '产品注册证号',
                    field: 'workExperience',
                    align: 'center',
                   
                },
                 {
                    title: '实际进价',
                    field: 'registraTime',
                    align: 'center',
                   
                },
                {
                    title: '数量',
                    field: 'resumeState',
                    align: 'center',
                    
                },
            	 {
                    title: '总金额',
                    field: 'resumeState',
                    align: 'center',
                    
                },
                {
                    title: '',
                    field: 'id',
                    align: 'center',
                    formatter: function (value, row) {
                        var e = '<a  href="#" onclick="openlayer(\'' + row.id + '\')">编辑</a> ';
                        var c = '<a  href="#" onclick="openlayer(\'' + row.id + '\')">删除</a> ';
                        return e+c;
                    }
                }
            ]
        });
    });
 
 $(function () {
     $('#table2').bootstrapTable({
         method: "get",
         striped: true,
         singleSelect: false,
         url: "",
         dataType: "json",
         pagination: true, //分页
         pageSize: 10,
         pageNumber: 1,
         search: false, //显示搜索框
         contentType: "application/x-www-form-urlencoded",
         queryParams: null,
         columns: [
             {
                 checkbox:"true",
                 field: 'ID',
                 align: 'center',
                 valign: 'middle'
             },
             {
                 title: "商品编号",
                 field: 'name',
                 align: 'center',
                 valign: 'middle'
             },
             {
                 title: '品名',
                 field: 'gender',
                 align: 'center',
                 valign: 'middle'
             },
             {
                 title: '生产厂家',
                 field: 'graduate',
                 align: 'center'
             },
             {
                 title: '规格',
                 field: 'education',
                 align: 'education',
                 valign: 'middle'
             },
             {
                 title: '型号',
                 field: 'major',
                 align: 'center',
                 valign: 'middle'
             },
             {
                 title: '单位',
                 field: 'postId',
                 align: 'center'
                
             },
              {
                 title: '产品注册证号',
                 field: 'workExperience',
                 align: 'center',
                
             },
              {
                 title: '实际进价',
                 field: 'registraTime',
                 align: 'center',
                
             },
             {
                 title: '数量',
                 field: 'resumeState',
                 align: 'center',
                 
             },
         	 {
                 title: '总金额',
                 field: 'resumeState',
                 align: 'center',
                 
             },
             {
                 title: '',
                 field: 'id',
                 align: 'center',
                 formatter: function (value, row) {
                     var e = '<a  href="#" onclick="openlayer(\'' + row.id + '\')">编辑</a> ';
                     var c = '<a  href="#" onclick="openlayer(\'' + row.id + '\')">删除</a> ';
                     return e+c;
                 }
             }
         ]
     });
 });

	$(function() {
				$('.table-sort').dataTable({
					"aaSorting": [
						[1, "desc"]
					], //默认第几个排序
					"bStateSave": true, //状态保存
					"aoColumnDefs": [
						//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
						{
							"orderable": false,
							"aTargets": [0, 8, 9]
						} // 制定列不参与排序
					]
				});
				
				$('.providerlist1').dataTable({
					"aaSorting": [
						[0, "desc"]
					], //默认第几个排序
					"bStateSave": true, //状态保存
					"aoColumnDefs": [
						//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
						{
							"orderable": false,
							"aTargets": [0, 1, 2, 3, 4, 5, 6]
						} // 制定列不参与排序
					]
				});
				/*$('.table-sort tbody').on('click', 'tr', function() {
					if($(this).hasClass('selected')) {
						$(this).removeClass('selected');
					} else {
						table.$('tr.selected').removeClass('selected');
						$(this).addClass('selected');
					}
				});*/

				$('td').parent().click(function() {
					$(this).toggleClass('back-color');
					$(this).siblings().removeClass('back-color');
				});

			});